package service_base

import (
	"strings"
	"wrblog-api-go/app/dao/dao_base"
	"wrblog-api-go/app/model/model_base"
)

func GetArticlePageList(baseArticle model_base.SelectBaseArticle) ([]model_base.BaseArticleVo, int64, error) {
	return dao_base.GetArticlePageList(baseArticle)
}

func GetArticleById(articleId int) (model_base.BaseArticleVo, error) {
	return dao_base.GetArticleById(articleId)
}

func AddArticle(baseArticle model_base.BaseArticlePo) (int, error) {
	return dao_base.AddArticle(baseArticle)
}

func EditArticle(baseArticle model_base.BaseArticlePo) (int64, error) {
	return dao_base.EditArticle(baseArticle)
}

func RemoveArticle(articleIds string, uk string) (int64, error) {
	return dao_base.RemoveArticle(strings.Split(articleIds, ","), uk)
}
